package com.zcxy.bean;

import com.zcxy.util.SpringContextHolder;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Order(value = 2)
public class InitAfter implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) throws Exception {
        InitBean initBean= SpringContextHolder.getBean(InitBean.class);
        System.out.println( initBean.getName()+"xxxxx");
    }
}
